package com.cradom.event.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cradom.event.dao.AccountDao;
import com.cradom.event.model.Account;
import com.cradom.event.model.Children;
import com.cradom.event.model.Event;
import com.cradom.event.model.Personal;
import com.cradom.event.service.AccountService;

@Service("userService")
public class AccountServiceImpl implements AccountService{

	@Resource
	private AccountDao ad;
	
	public Boolean addAccount(Account account) {
		return ad.addAccount(account);
	}

	public Boolean addPersonnal(Personal personal) {
		return ad.addPersonal(personal);
	}

	public Boolean addChildren(Children children) {
		return ad.addChildren(children);
	}

	public Boolean addEvent(Event event) {
		return ad.addEvent(event);
	}

	public Account findAccountByPhone(String phone) {
		return ad.findAccountByPhone(phone);
	}

	public List<Account> getAccount() {
		return ad.getAccount();
	}

	public Account getAccountByID(String id) {
		return ad.getAccountByID(id);
	}

	public Boolean updateAccount(Account account) {
		return ad.updateAccount(account);
	}

	public Boolean deleteAccount(String id) {
		return ad.deleteAccount(id);
	}

	public String getIdByPhone(String phone) {
		return ad.getIdByPhone(phone);
	}
	
}
